Optimal. Leaf size=344 \[ \frac {2 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a^2 d}+\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b^2 d}+\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}+\frac {2 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.40, antiderivative size = 344, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3894, 4061, 4059, 3921, 3784, 3832, 4004} \[ \frac {2 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a^2 d}+\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b^2 d}+\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}+\frac {2 \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3784
Rule 3832
Rule 3894
Rule 3921
Rule 4004
Rule 4059
Rule 4061
Rubi steps
\begin {align*} \int \frac {\tan ^2(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx &=\int \frac {-1+\sec ^2(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx\\ &=\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}-\frac {2 \int \frac {\frac {1}{2} \left (a^2-b^2\right )+\frac {1}{2} \left (a^2-b^2\right ) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{a \left (a^2-b^2\right )}\\ &=\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}-\frac {\int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}-\frac {2 \int \frac {\frac {1}{2} \left (a^2-b^2\right )-\frac {1}{2} \left (a^2-b^2\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{a \left (a^2-b^2\right )}\\ &=\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a b^2 d}+\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}-\frac {\int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}+\frac {\int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}\\ &=\frac {2 (a-b) \sqrt {a+b} \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a b^2 d}+\frac {2 \sqrt {a+b} \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a b d}+\frac {2 \sqrt {a+b} \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^2 d}+\frac {2 \tan (c+d x)}{a d \sqrt {a+b \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 23.59, size = 5162, normalized size = 15.01 \[ \text {Result too large to show} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.77, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\sqrt {b \sec \left (d x + c\right ) + a} \tan \left (d x + c\right )^{2}}{b^{2} \sec \left (d x + c\right )^{2} + 2 \, a b \sec \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan \left (d x + c\right )^{2}}{{\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.19, size = 633, normalized size = 1.84 \[ -\frac {\sqrt {4}\, \left (\cos \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticE \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {\frac {a -b}{a +b}}\right ) a +\cos \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticE \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {\frac {a -b}{a +b}}\right ) b -2 \cos \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, -1, \sqrt {\frac {a -b}{a +b}}\right ) b +\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticE \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {\frac {a -b}{a +b}}\right ) a +\sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticE \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, \sqrt {\frac {a -b}{a +b}}\right ) b -2 \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \sin \left (d x +c \right ) \EllipticPi \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}, -1, \sqrt {\frac {a -b}{a +b}}\right ) b -a \left (\cos ^{2}\left (d x +c \right )\right )+\left (\cos ^{2}\left (d x +c \right )\right ) b +a \cos \left (d x +c \right )-b \cos \left (d x +c \right )\right ) \sqrt {\frac {b +a \cos \left (d x +c \right )}{\cos \left (d x +c \right )}}}{d \left (b +a \cos \left (d x +c \right )\right ) \sin \left (d x +c \right ) a b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan \left (d x + c\right )^{2}}{{\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________